#include "MBCameraViewWithShiftVector.h"

using std::string;

/**
  *	Constructs a new MBCameraViewWithShiftVector object with the given
  * parameters.
  *
  * @param imagePath full path of the image, the camera view belongs to
  * @param cameraModel const pointer to the underlying camera model
  * @param cameraPosID unique ID of the camera position
  * @param mount 4x4 matrix describing the transformation from the SOCS (Scanner's Own Coordinate System) into the CMCS (CaMera Coordinate System) at the reference orientation
  * @param COP 4x4 matrix holding the information about the orientation of the camera within the scanner's own coordinate system with respect to a reference orientation
  * @param SOP 4x4 matrix describing the transformation from the SOCS (Scanner's Own Coordinate System) into the PRCS (PRoject Coordinate System)
  * @param POP 4x4 matrix describing the transformation from the PRCS (PRoject Coordinate System) into the GLCS (GLobal Coordinate System)
  * @param shiftVector shift vector in texture space that is used for translation of the projected triangle
  */
MBCameraViewWithShiftVector::MBCameraViewWithShiftVector(
	const string &imagePath,
	const MBCameraModel *cameraModel,
	const MBuint &cameraPosID,
	const MBMatrix4x4 &mount,
	const MBMatrix4x4 &COP,
	const MBMatrix4x4 &SOP,
	const MBMatrix4x4 &POP,
	const MBVec2 &shiftVector ) :

	MBCameraView( imagePath, cameraModel, cameraPosID, mount, COP, SOP, POP ),
	mShiftVector( shiftVector )
{

}

/**
  *	Constructs a new MBCameraViewWithShiftVector object with the passed arguments.
  *
  * @param imagePath full path of the image, the camera view belongs to
  * @param cameraModel const pointer to the underlying camera model
  * @param cameraPosID unique ID of the camera position
  * @param locationX x-coordinate of the camera in 3D space
  * @param locationY y-coordinate of the camera in 3D space
  * @param locationZ z-coordinate of the camera in 3D space
  * @param rotationX rotation around the x-axis inside an XYZ Euler rotation
  * @param rotationY rotation around the y-axis inside an XYZ Euler rotation
  * @param rotationZ rotation around the z-axis inside an XYZ Euler rotation
  * @param shiftVector shift vector in texture space that is used for translation of the projected triangle
  */
MBCameraViewWithShiftVector::MBCameraViewWithShiftVector(
	const string &imagePath,
	const MBCameraModel *cameraModel,
	const MBuint &cameraPosID,
	const double &locationX,
	const double &locationY,
	const double &locationZ,
	const double &rotationX,
	const double &rotationY,
	const double &rotationZ,
	const MBVec2 &shiftVector ) :
	
	MBCameraView( imagePath, cameraModel, cameraPosID, locationX, locationY, locationZ, rotationX, rotationY, rotationZ ),
	mShiftVector( shiftVector )
{

}

/**
  *	Constructs a new MBCameraViewWithShiftVector with the given arguments
  *
  * @param cameraView MBCameraView this object is based on
  * @param shiftVector shiftVector shift vector in texture space that is used for translation of the projected triangle
  */
MBCameraViewWithShiftVector::MBCameraViewWithShiftVector(
	const MBCameraView &cameraView,
	const MBVec2 &shiftVector ) :
	
	MBCameraView( cameraView ),
	mShiftVector( shiftVector )
{

}

/**
  *	Returns the shift vector, that is used for translation of the projected triangle
  *
  * @return shift vector, that is used for translation of the projected triangle
  */
const MBVec2 &MBCameraViewWithShiftVector::GetTexcoordShiftVector( void ) const
{
	return mShiftVector;
}